<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'memberCenter.jsp' starting page</title>
	<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css"> 
	<link rel="stylesheet" href="assets/css/member/membercenter.css">
  </head>
  
  <body>
  	<div id="mainbox" class="container"> 
	    <div id="header">
	    	<div id="toplogo" style="background:url('assets/images/logo/back_top.jpg');">
	    			<div class="topsign">Java Share</div>
	    	</div>
	    	<div id="menu">
	    		<div class="navbar">
				  <div class="navbar-inner">
				    <div class="container">
				      <ul class="nav">
					      <li><a href="member_memberCenter">用户中心</a></li>
						  <li><a href="member_memberCenter?module=article">我的文章</a></li>
						  <li><a href="member_memberCenter?module=tiezi">帖子中心</a></li>
						  <li><a href="member_memberCenter?module=myinfo">我的信息</a></li>
						  <li><a href="member_logoff" class="pull-right">注销</a></li>
						  <!-- 
						  <li class="dropdown">
						    <a href="#"
						          class="dropdown-toggle"
						          data-toggle="dropdown">
						          帐户
						          <b class="caret"></b>
						    </a>
						    <ul class="dropdown-menu">
						     
						    </ul>
						  </li> -->
						</ul>
				    </div>
				  </div>
				</div>
	    	</div>
	    </div>
	    <div id="content" >
	    	<div id="leftColumn">
	    		欢迎回来,<s:property value="member.name"/>
	    		<br/>
	    		注册时间,<s:date name="member.regtime" format="yyyy-MM-dd HH:mm:ss" />
	    		
	    		<br/>
	    		注册邮箱,<s:property value="member.email"/>
	    		
	    		<br/>
	    		权限级别,<s:property value="member.role"/>
	    		
	    		<div class="articles">
	    			<h3>我的文章</h3>
	    			<s:if test="member.articles.size > 0" >
	    				
	    				<table class="table">
	    				<thead>
	    					<tr><td>标题</td><td>发表时间</td><td>所属类别</td><td>文章标签</td></tr>
	    				</thead>
	    				<tbody>
	    				<s:iterator value="member.articles" id="article">
	    				
	    					<tr>
	    						<td><s:property value="#article.title"/></td>
	    						<td><s:date name="#article.postdate" format="yyyy-MM-dd HH:mm:ss"/></td>
	    						<td><s:property value="#article.arCategory.name"/></td>
	    						<td><s:property value="#article.tags"/></td>
	    					</tr>
	    				
	    				</s:iterator>
	    				</tbody>
	    				</table>
	    				<a href="article/editarticle.jsp">我要写文章</a>
	    			</s:if>
	    			<s:else>
	    				<div>您还没有发表过文章哟、。<a href="article/editarticle.jsp">我要写文章</a></div>
	    			</s:else>
	    			
	    		</div>
	    		
	    		<s:debug></s:debug> 
	    	</div>
	    	<div id="rightColumn">
	    	
	    	</div>
	    </div>
    </div>
  </body>
</html>
